<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/commom.css"/>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css"/>
	</head>
	<body>
		
		<div class="container-fluid right-iframe-wrapper">
			<div class="row">
				<div class="right-title">
					<h1 class="font-18">社团活动管理<small class="font-16">&nbsp;&nbsp;-&nbsp;&nbsp;社团活动管理</small></h1>
				</div>
				<div class="clearfix"></div>
				<div class="row">
					<!--<span class="pull-left">
						
						<a class="btn btn-danger">班级信息表</a>
						
					</span>-->
					<div class="right-search col-md-4 col-xs-6 pull-right no-pd-right">
						
						<div class="input-group">
							<input type="text" class="form-control" placeholder="输入关键字搜索" id="a">
							<span class="input-group-btn">
						        <button class="btn btn-warning" type="button" id="seach">搜索</button>
						    </span>
						</div>
					</div>
				</div>
				
				<!--表格-->
				<div class="right-table">
					<table class="table table-bordered table-hover text-center">
						<thead>
							<tr>
								<!--<th>选择框</th>-->
								<th>活动编号</th>
								<th>活动名称</th>
								<th>社团名称</th>
								<th>活动开始时间</th>
								<th>活动结束时间</th>
								<th>操作</th>
								<!--<th>课时</th>-->
								<!--<th>目前状态</th>-->
								<!--<th>阶段奖励</th>
								<th>负激励</th>-->
							</tr>
						</thead>
						<tbody name="cx">
						<c:forEach items="${Activitylist }" var="list">
							<tr>
								<!--<td>
									<section>
									    <div class="check">
									      <input type="checkbox" value="None" id="a1-1"/>
									      <label for="a1-1"></label>
									    </div>
									</section>
								</td>-->
								<td>${list.aid }</td>
								<td>${list.name }</td>
								<td>${list.gname }</td>
								<td>${list.date1 }</td>
								<td>${list.date2 }</td>
								<td><!-- <a style="cursor: pointer;">编辑</a>| --><a style="cursor: pointer;" href="deteleActivity.do?aid=${list.aid }">删除</a></td>
								<!--<td>7</td>-->
								<!--<td>10</td>-->
							</tr>
							</c:forEach>				
						</tbody>
					</table>
				</div>
				<!--分页-->
				<!-- <div class="page">
					首页<a href="#">|&lt;</a>
					上一页<a href="#">&lt;</a>
					<span class="pager">
						<a class="current" href="#">1</a>
						<a href="#">2</a>
						<a href="#">3</a>
						<a href="#">4</a>
					</span>
					下一页<a href="#">&gt;</a>
					末页<a href="#">&gt;|</a>
				</div> -->
				<!--分页 end-->
			</div>
		</div>
		
		
		
		<script src="${pageContext.request.contextPath}/js/bootstrap.min.js" type="text/javascript"></script>
		<script src="${pageContext.request.contextPath}/js/jquery-2.1.3.min.js" type="text/javascript"></script>
		<script type="text/javascript">
					//下拉列表赋值
					$("#seach").click(function(){
						$.post("hdseach.do",{seach:$("#a").val()},function(result){
							if(result!=""){
								$("tbody[name='cx']").empty();
								for(var i=0;i<result.length;i++){
									
										$("tbody[name='cx']").append("<tr><td>"+result[i].aid+"</td>"
												+"<td>"+result[i].name+"</td><td>"+result[i].gname+"</td>"
												+"<td>"+result[i].date1+"</td><td>"+result[i].date2+"</td>"+"<td><a style='cursor: pointer;'>编辑</a>|<a style='cursor: pointer;' href='deteleActivity.do?aid="+result[i].aid+"'>删除</a></td></tr>");
									}	
								}
							else{
								alert("没有此活动！")
							}
						});
					})
				
			
		</script>
	</body>
</html>
